/**
 * 作者: wgx
 * 日期: 2025-03-31 10:55:19
 * 备注: 用户已解锁的餐厅
 */
package com.motu.monstercity.server.game.userdata;

import com.motu.monstercity.protocol.Common.PBUserData;
import com.motu.monstercity.server.game.commondata.restaurant.RestaurantUpgrade;
import com.motu.monstercity.server.game.logic.GameUser;
import com.motu.monstercity.server.game.logic.RestaurantManager;

public class UserRestaurantRoom extends UserRestaurantRoomModel {
    public UserRestaurantRoom() {
        super();
    }

    public void putLevel(PBUserData.Builder pbUserData, UserInfo userInfo, UserPower userPower, UserRestaurantInfo userRestaurantInfo, int level, boolean isUpdateRestaurantInfo) {
        super.putLevel(level);

        RestaurantUpgrade restaurantUpgrade = RestaurantManager.getRestaurantUpgrade(restaurantId, getLevel());
        if (restaurantUpgrade != null && restaurantUpgrade.getFoodId() > 0) {// 解锁美食攻略
            RestaurantManager.unlockRestaurantFood(pbUserData, userInfo, userPower, userRestaurantInfo, restaurantUpgrade.getFoodId(), isUpdateRestaurantInfo);
        }
    }
}
